package _5YuanXin;

/**
 * @Test: 原型模式 测试
 * @author: ZBoHang
 * @time: 2021/9/7 13:28
 */
class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        ShapeCache.loadCache();

        Shape clonedShape1 = ShapeCache.getShape("1");
        System.out.println("1 " + clonedShape1.getType());

        Shape clonedShape2 = ShapeCache.getShape("2");
        System.out.println("2 " + clonedShape2.getType());

        Shape clonedShape3 = ShapeCache.getShape("3");
        System.out.println("3 " + clonedShape3.getType());
    }
}
